package com.oocl.o2o.client.dao;

import java.util.List;

import com.oocl.o2o.client.entity.Customer;
import com.oocl.o2o.client.entity.OrderInfo;

/**
 * @description: CustomerDao
 * @author  XIEMI2
 * @date Aug 12, 2017 3:20:18 PM
 * @version 1.0
 */
public interface CustomerDao {

	/**
	 * find all customers
	 * @return List<Customer>
	 */
	public List<Customer> findAll();
	
	/**
	 * insert an Customer to database
	 * @param customer
	 * @return Customer
	 */
	public Customer add(Customer customer);

	/**
	 * 
	 * @param customerId
	 * @return Customer
	 */
	public Customer delete(String customerId);
	
	/**
	 * 
	 * @param Customer
	 * @return Customer
	 */
	public Customer update(Customer customer);
	
	/**
	 * 
	 * @param customerId
	 * @return Customer
	 */
	public Customer findById(String customerId);
	
	/**
	 * 
	 * @param customerName
	 * @return Customer
	 */
	public Customer findByCustomerName(String customerName);
	
	/**
	 * 
	 * @param customerId
	 * @return Customer or null
	 */
	public Customer findByCustomerId(String customerId);
	
	/**
	 * 
	 * @param merchantName
	 * @param password
	 * @return Customer
	 */
	public Customer findByCustomerNameAndPassword(String merchantName, String password);
}


